import 'package:get/get.dart';
import 'package:safetymonitor/app/core/http/http.dart';
import 'package:safetymonitor/app/core/utils/interface.dart';
import 'package:safetymonitor/app/data/entities/application/preventive_rectification_get_entity.dart';
///已完成
class CompletedStateController extends GetxController {
  PreventiveRectificationGetEntity preventiveRectificationGetEntity=PreventiveRectificationGetEntity();

  ///	隐患上报视频集合[数组]
  List<String>? dangerVideo = [];
  List<String>? dangerImages = [];
  @override
  void onInit() {
    super.onInit();
    initData();
  }
  /// 初始化数据
  Future<void> initData() async {
    //获取组织数据
    final res = await HttpUtil().generateGetRequest<PreventiveRectificationGetEntity>(
        Interface.preventiveRectificationGet,
        queryParameters: {
          'id': Get.arguments
        }).execute(isShowLoading: true);
    res.onSuccess((result) {
      if (result.data != null) {
        preventiveRectificationGetEntity= result.data ??PreventiveRectificationGetEntity();
      }
      update();
    });
  }
}